//
//  CALayer+Crossfade.m
//  CXDToolKit
//
//  Created by 陈小东 on 15/3/4.
//  Copyright (c) 2015年 ___cxd___. All rights reserved.
//

#import "CALayer+Crossfade.h"

@implementation CALayer (Crossfade)
- (void)transitionCrossfadeWithDuration:(CFTimeInterval)duration{
    CATransition *transition = [CATransition animation];
    transition.duration = duration;
    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    transition.type = kCATransitionFade;
    [self addAnimation:transition forKey:@"transitionCrossfade"];
}
@end
